package wisents.wicket;

import wisents.api.ElementCriteria;
import wisents.api.PageElement;
import wisents.api.factory.ElementCriteriaFactory;
import wisents.wicket.element.*;

import java.util.List;

/**
 * User: paul.szulc Date: Dec 20, 2009 Time: 2:05:27 PM
 */

//TODO factory's and criterias' scope needs changing
class WicketElementCriteriaFactory implements ElementCriteriaFactory {


    public final ElementCriteria createExistCriteria(PageElement pageElement) {
        return new ExistElementCriteria(pageElement);
    }

    public final ElementCriteria createIsVisibleCriteria(PageElement pageElement) {
        return new IsVisibleElementCriteria(pageElement);
    }

    public final ElementCriteria createIsInvisibleCriteria(PageElement pageElement) {
        return new IsInvisibleElementCriteria(pageElement);
    }

    public final ElementCriteria createIsEnabledCriteria(PageElement pageElement) {
        return new IsEnabledElementCriteria(pageElement);
    }

    public final ElementCriteria createIsDisabledCriteria(PageElement pageElement) {
        return new IsDisabledElementCriteria(pageElement);
    }

    public final ElementCriteria isTextFieldWithValue(PageElement pageElement,
                                                      String value) {
        return new IsTextFieldWithValueElementCriteria(pageElement, value);
    }

    public ElementCriteria isTextAreaWithValue(PageElement pageElement, String value) {
        return new IsTextAreaWithValueElementCriteria(pageElement, value);
    }


    public ElementCriteria createIsLabelWithValueCriteria(PageElement pageElement, String value) {
        return new IsLabelWithValueElementCriteria(pageElement, value);
    }


    public ElementCriteria createIsCheckedCriteria(PageElement pageElement) {

        throw new UnsupportedOperationException();
    }


    public ElementCriteria createIsComboboxWithValuesCriteria(
            PageElement pageElement, List<?> elements) {

        throw new UnsupportedOperationException();
    }


    public ElementCriteria createIsNotCheckedCriteria(PageElement pageElement) {

        throw new UnsupportedOperationException();
    }
}
